<template>
  <div class="head-box" @click="handHead()">
    <img
      class="head-img"
      :src="$filters.prefix(details.artistPortrait)"
      fit="cover"
    />
    <div class="name">
      {{ details.artistName }}
    </div>
    <div class="post" style="margin: 8px 0">
      职位：{{ details.artistPosition }}
    </div>
    <div class="post">联系方式：182********</div>
  </div>
</template>

<script lang="ts">
import { computed, defineComponent } from "vue";
export default defineComponent({
  name: "headMsg",
  props: {
    details: {
      type: Object,
      default: () => {
        return {};
      },
    },
  },
  setup(props) {
    
    const handHead = () => {
      if (props.details.recordId) {
        window.open(
          `http://h5.cbda1984.com/personDetail?recordId=${props.details.recordId}`
        );
      }
    };
    return { handHead };
  },
});
</script>
<style lang="scss" scoped>
.head-box {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  margin-bottom: 40px;
  .head-img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    margin-right: 8px;
  }
  .name {
    font-weight: bold;
    color: #333;
    font-size: 22px;
  }
  .post {
    color: #666;
    font-size: 13px;
  }
}
</style>
